package com.mason.forum.dao;

import com.mason.forum.model.ArticleReply;
import com.mason.forum.model.vo.ArticleReplyVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleReplyMapper {
    int insert(ArticleReply row);

    int insertSelective(ArticleReply row);

    ArticleReply selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ArticleReply row);

    int updateByPrimaryKey(ArticleReply row);

    /**
     * 查找一个帖子的回复列表
     * @param articleId 帖子id
     * @return 返回帖子列表
     */
    List<ArticleReplyVO> selectRepliesById(@Param("articleId") Long articleId);
}